package com.cy.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cy.dao.TRecordMapper;
import com.cy.entity.TRecord;
import com.cy.service.TRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : ChenYuan
 * @date : Created in 2020/8/12  10:19
 * @description:
 */
@Service("TRecordServiceImpl")
@DS("slave_1")
public class TRecordServicelmpl extends ServiceImpl<TRecordMapper, TRecord> implements TRecordService {
    @Resource
    private TRecordMapper tRecordMapper;
    //数据源slave_1
    @Override
    public List<TRecord> selectTRecords() {
        return tRecordMapper.selectList(new QueryWrapper<>());
    }
}
